package com.wabi.frame.components;

import javax.swing.ButtonGroup;
import javax.swing.JMenu;
import javax.swing.JRadioButtonMenuItem;

import com.wabi.action.MenuActionListener;

public class TabMenu extends JMenu{

	public TabMenu(String title){
		this.setText(title);
		ButtonGroup group = new ButtonGroup();

		JRadioButtonMenuItem settings = new JRadioButtonMenuItem("Settings");
		settings.setSelected(true);
		JRadioButtonMenuItem plane = new JRadioButtonMenuItem("Airplane");
		
		MenuActionListener listener = new MenuActionListener();
		settings.setActionCommand("SET");
		plane.setActionCommand("AIR");
		settings.addActionListener(listener);
		plane.addActionListener(listener);
		
		group.add(settings);
		group.add(plane);
		
		this.add(settings);
		this.add(plane);
	}
}
